package com.example.demo.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import java.util.Objects;

/**
 * @author Jim Chen
 * @date 2022-10-19
 */
public class Question {
  private Integer id;
  private String question;
  private String answer;

  @TableField("option_a")
  private String optionA;
  @TableField("option_b")
  private String optionB;
  @TableField("option_c")
  private String optionC;
  @TableField("option_d")
  private String optionD;
  @TableField("option_e")
  private String optionE;

  @Override
  public String toString() {
    return "Question{" +
        "id=" + id +
        ", question='" + question + '\'' +
        ", answer='" + answer + '\'' +
        ", optionA='" + optionA + '\'' +
        ", optionB='" + optionB + '\'' +
        ", optionC='" + optionC + '\'' +
        ", optionD='" + optionD + '\'' +
        ", optionE='" + optionE + '\'' +
        '}';
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Question question1 = (Question) o;
    return Objects.equals(id, question1.id) &&
        Objects.equals(question, question1.question) &&
        Objects.equals(answer, question1.answer) &&
        Objects.equals(optionA, question1.optionA) &&
        Objects.equals(optionB, question1.optionB) &&
        Objects.equals(optionC, question1.optionC) &&
        Objects.equals(optionD, question1.optionD) &&
        Objects.equals(optionE, question1.optionE);
  }

  @Override
  public int hashCode() {

    return Objects.hash(id, question, answer, optionA, optionB, optionC, optionD, optionE);
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getQuestion() {
    return question;
  }

  public void setQuestion(String question) {
    this.question = question;
  }

  public String getAnswer() {
    return answer;
  }

  public void setAnswer(String answer) {
    this.answer = answer;
  }

  public String getOptionA() {
    return optionA;
  }

  public void setOptionA(String optionA) {
    this.optionA = optionA;
  }

  public String getOptionB() {
    return optionB;
  }

  public void setOptionB(String optionB) {
    this.optionB = optionB;
  }

  public String getOptionC() {
    return optionC;
  }

  public void setOptionC(String optionC) {
    this.optionC = optionC;
  }

  public String getOptionD() {
    return optionD;
  }

  public void setOptionD(String optionD) {
    this.optionD = optionD;
  }

  public String getOptionE() {
    return optionE;
  }

  public void setOptionE(String optionE) {
    this.optionE = optionE;
  }
}
